<template>
    <el-form class="systemFileEditForm" ref="systemFileInfo" :inline="true" :model="systemFileInfo" label-width="80px">
                    <el-form-item :label="{{$t('system.fileName')}}">
                        <el-input v-model="systemFileInfo.fileName"></el-input>
                    </el-form-item>
                    <el-form-item :label="{{$t('system.fileFcId')}}">
                        <el-select v-model="systemFileInfo.fileFcId" style="width: 92%;" multiple :placeholder="$t('common.selectTips')">
                            <el-option
                                    v-for="item in options.fileFcId"
                                    :key="item.fcId"
                                    :label="item.fcName"
                                    :value="item.fcId">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item :label="{{$t('system.fileSize')}}">
                        <el-input v-model="systemFileInfo.fileSize"></el-input>
                    </el-form-item>
                    <el-form-item :label="{{$t('system.fileSuffix')}}">
                        <el-input v-model="systemFileInfo.fileSuffix"></el-input>
                    </el-form-item>
                    <el-form-item :label="{{$t('system.fileSource')}}">
                        <el-input v-model="systemFileInfo.fileSource"></el-input>
                    </el-form-item>
    </el-form>
</template>
<script>
    import request from '@/utils/request'
    export default {
        name: 'systemFileEdit',
        props: ['systemFileInfo'],
        data() {
            return {
                //所有的下拉选项
                options:{
                    fileFcId: [],
                }
            }
        },
        watch: {
            systemFileInfo: function(val) {

            }
        },
        //页面初始化加载
        created() {
            this.getFileFcId();
        },
        methods: {
            getFileFcId() {
                request({
                    url: '/fileCategory/query',
                    method: 'post'
                }).then(response => {
                    this.options["fileFcId"] = response.data;
                })
            },
        }
    }
</script>
<style>
    .systemFileEditForm .el-form-item {
        width: 45%;
    }

    .systemFileEditForm .el-input {
        width: 100%;
    }
</style>
